home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
HAM_RAD
/
PROPAGAT
/
1004A.ZIP
/
EMELINK.BAS
< prev
next >
Wrap
BASIC Source File
|
1986-05-23
|
3KB
|
97 lines
10 REM THIS PROGRAM CALCULATES THE SIGNAL TO NOISE
20 REM RATIO OF EME SIGNALS, GIVEN THE EQUIPMENT
30 REM PARAMETERS, FOR THE AVERAGE EARTH-MOON DISTANCE.
40 REM AT PERIGEE SIGNALS WLL BE 1 DB STRONGER, AT APOGEE 1 DB WEAKER.
50 REM
60 REM PROGRAM INPUTS ARE OBVIOUS: NOTE THAT THE
70 REM RECEIVER SENSITIVITY MAY BE GIVEN AS EITHER
80 REM NOISE FIGURE [NUMBER <20] OR NOISE TEMP
90 REM [NUMBER >20]; ANTENNA PARAMETERS ARE EITHER
100 REM THIS PROGRAM CALCULATES THE SIGNAL TO NOISE
110 REM RATIO OF EME SIGNALS, GIVEN THE EQUIPMENT
120 REM PARAMETERS, FOR THE AVERAGE EARTH-MOON DISTANCE.
130 REM AT PERIGEE SIGNALS WLL BE 1 DB STRONGER, AT APOGEE 1 DB WEAKER.
140 REM
150 REM PROGRAM INPUTS ARE OBVIOUS: NOTE THAT THE
160 REM RECEIVER SENSITIVITY MAY BE GIVEN AS EITHER
170 REM NOISE FIGURE [NUMBER <20] OR NOISE TEMP
180 REM [NUMBER >20]; ANTENNA PARAMETERS ARE EITHER
190 REM DISH DIA IN FEET [ENTERED AS A NUMBER], OR
200 REM ANTENNA GAIN [ENTERED AS GAIN/100, E.G. 9 DB
210 REM ENTERED AS .09].
220 REM
230 REM
240 REM WRITTEN BY C.W.SUCKLING G3WDG, 28 FEB 1983
250 REM
260 REM GET INPUT DATA
270 GOSUB 350
280 GOSUB 370
290 GOSUB 390
300 GOSUB 410
310 GOSUB 430
320 GOSUB 450
330 GOSUB 480
340 REM SUBROUTINES TO GET INPUT DATA
350 INPUT "SYSTEM NOISE TEMP OR NOISE FIGURE ";N
360 RETURN
370 INPUT "RX BANDWIDTH (HZ) ";B
380 RETURN
390 INPUT "FREQUENCY (MHZ) ";F
400 RETURN
410 INPUT "ANT 1 DIA (FT) OR GAIN (.DB) ";D1
420 RETURN
430 INPUT "ANT 2 DIA (FT) OR GAIN (.DB) ";D2
440 RETURN
450 INPUT "TX POWER (W) ";P
460 RETURN
470 REM ANTENNA CALCULATIONS
480 D=D1: GOSUB 530
490 G1=G: A1$=D$: A1=A
500 D=D2: GOSUB 530
510 G2=G: A2$=D$:A2=A
520 GOTO 590
530 IF D<1 THEN GOTO 560
540 D$="FT":G=(4.3422*LOG(5.094*D*D*F*F))-60: A=D
550 GOTO 570
560 D$="DB": G=100*D: A=G
570 RETURN
580 REM CONVERT NOISE FIGURE TO NOISE TEMPERATURE
590 IF N<20 THEN GOTO 620
600 T=N:N$="K"
610 GOTO 640
620 T=290*(EXP(.2303*N)-1):N$="DB"
630 REM CALCULATE RECEIVER NOISE POWER
640 R=-228.6+4.3422*LOG(T)+4.3422*LOG(B)
650 REM CALCULATION OF SIGNAL TO NOISE RATIO
660 L=-271+8.6844*LOG(1296/F)
670 REM CALCULATION OF PATH LOSS
680 S=G1+G2+4.3422*LOG(P)+L-R
690 S=INT(S*10)/10
700 REM PRINT OUT RESULTS
710 PRINT
720 PRINT "CODE PARAMETER CURRENT VALUE"
730 PRINT
740 PRINT "1 NOISE TEMP/FIG ";N;N$
750 PRINT "2 BANDWIDTH ";B;"HZ"
760 PRINT "3 FREQUENCY ";F;"MHZ"
770 PRINT "4 ANTENNA 1 ";A1;A1$
780 PRINT "5 ANTENNA 2 ";A2;A2$
790 PRINT "6 TX POWER ";P;"W"
800 PRINT
810 PRINT "SIGNAL TO NOISE RATIO ";S;"DB"
820 PRINT
830 REM GET FURTHER INSTRUCTIONS
840 INPUT "NEW PARAM (1 TO 6), RE-RUN (R) OR QUIT (Q)";A$
850 :
860 PRINT
870 IF A$= "Q" THEN STOP
880 IF A$= "R" THEN GOTO 270
890 IF A$= "1" THEN GOSUB 350
900 IF A$= "2" THEN GOSUB 370
910 IF A$= "3" THEN GOSUB 390
920 IF A$= "4" THEN GOSUB 410
930 IF A$= "5" THEN GOSUB 430
940 IF A$= "6" THEN GOSUB 450
950 GOTO 480
960 END